<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    template="/layout/template.xhtml">

<ui:define name="body">

    <rich:panel>
        <f:facet name="header">Telefone</f:facet>


        <s:decorate id="contato" template="/layout/display.xhtml">
            <ui:define name="label">Contato</ui:define>
            <h:outputText value="#{telefoneHome.instance.contato}"/>
        </s:decorate>

        <s:decorate id="numero" template="/layout/display.xhtml">
            <ui:define name="label">Número</ui:define>
            <h:outputText value="#{telefoneHome.instance.numero}"/>
        </s:decorate>

        <s:decorate id="ramal" template="/layout/display.xhtml">
            <ui:define name="label">Ramal</ui:define>
            <h:outputText value="#{telefoneHome.instance.ramal}"/>
        </s:decorate>

        <s:decorate id="tipoTelefone" template="/layout/display.xhtml">
            <ui:define name="label">Tipo de Telefone</ui:define>
            <h:outputText value="#{telefoneHome.instance.tipoTelefone}"/>
        </s:decorate>

        <div style="clear:both"/>

    </rich:panel>

    <div class="actionButtons">

        <s:button view="/resources/TelefoneEdit.xhtml"
                    id="edit"
                 value="Editar"/>

        <s:button view="/resources/#{empty telefoneFrom ? 'TelefoneList' : telefoneFrom}.xhtml"
                    id="done"
                 value="Concluído"/>

    </div>

    <rich:tabPanel switchType="ajax">

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/manytoone.gif" style="vertical-align: middle; padding-right: 4px;"/>Administrador de Grupo</h:panelGroup>
        </f:facet>
    <div class="association" id="administradorGrupoParent">

        <h:outputText value="Não existe Administrador de Grupo associado."
                   rendered="#{telefoneHome.instance.administradorGrupo == null}"/>

        <rich:dataTable var="_administradorGrupo"
                   value="#{telefoneHome.instance.administradorGrupo}"
                rendered="#{telefoneHome.instance.administradorGrupo != null}"
              rowClasses="odd,even"
                      id="administradorGrupoTable">
            <h:column>
                <f:facet name="header">Nome</f:facet>
                <h:outputText value="#{_administradorGrupo.nome}"/>
            </h:column>
            <h:column>
                <f:facet name="header">E-mail</f:facet>
                <h:outputText value="#{_administradorGrupo.email}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Status</f:facet>
                <h:outputText value="#{_administradorGrupo.status}"/>
            </h:column>
            
            <rich:column styleClass="action">
                <f:facet name="header">Opções</f:facet>
                <s:link id="viewadministradorGrupo"
                     value="Ver"
                      view="/resources/AdministradorGrupo.xhtml">
                    <f:param name="administradorGrupoId"
                           value="#{_administradorGrupo.id}"/>
                </s:link>
            </rich:column>
        </rich:dataTable>

    </div>
    </rich:tab>
</rich:tabPanel>
</ui:define>

</ui:composition>
